package com.kitty.game.chengzhangmiji.controller;

import com.kitty.game.chengzhangmiji.message.ReqCzmjActiveType;
import com.kitty.game.chengzhangmiji.message.ReqCzmjLevelBonus;
import com.kitty.game.chengzhangmiji.message.ReqCzmjTaskBonus;
import com.kitty.game.chengzhangmiji.message.ReqOpenChengZhangMiJi;
import com.kitty.game.chengzhangmiji.service.ChengZhangMiJiService;
import com.kitty.game.role.model.Role;
import com.kitty.mina.annotation.RequestMapping;
import com.kitty.mina.cache.SessionUtils;
import org.apache.mina.core.session.IoSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class ChengZhangMiJiController {
    @Autowired
    ChengZhangMiJiService chengZhangMiJiService;
    @RequestMapping
    public void openChengZhangMiJi(IoSession session, ReqOpenChengZhangMiJi chengZhangMiJiData) {
        Role role = SessionUtils.getRoleBySession(session);
        chengZhangMiJiService.openChengZhangMiJi(role);
    }
    @RequestMapping
    public void fetchLevelBonus(IoSession session, ReqCzmjLevelBonus ReqCzmjLevelBonus) {
        Role role = SessionUtils.getRoleBySession(session);
        chengZhangMiJiService.fetchLevelBonus(role , ReqCzmjLevelBonus);
    }
    @RequestMapping
    public void byCzmjActive(IoSession session, ReqCzmjActiveType reqCzmjActiveType) {
        Role role = SessionUtils.getRoleBySession(session);
        chengZhangMiJiService.byCzmjActive(role , reqCzmjActiveType);
    }
    @RequestMapping
    public void fetchTaskBonus(IoSession session, ReqCzmjTaskBonus reqCzmjTaskBonus) {
        Role role = SessionUtils.getRoleBySession(session);
        chengZhangMiJiService.fetchTaskBonus(role , reqCzmjTaskBonus);
    }
}
